Generating geographic borders

ABSTRACT

Techniques are described for generating geographic borders. In one example, techniques include recognizing a geographic location, determining a starting latitude and a starting longitude and population for the geographic location, and generating a border for the geographic location based on the starting latitude, starting longitude, and population.

TECHNICAL FIELD

The invention relates to geographical mapping software and systems.

BACKGROUND

Geography is an area that is widely used today in natural language. Datafor borders/perimeters of continents and countries is available but notnecessarily consistent as different countries disagree of territory. Forprovinces and cities the data is scarce or non-existent. Population andpopulation density are generally available from cities to continentswhich provides a consistent measure across landmass.

SUMMARY

In general, examples disclosed herein are directed to techniques forgenerating geographic borders. In one example, techniques includerecognizing a geographic location, determining a starting latitude and astarting longitude and population for the geographic location, andgenerating a border for the geographic location based on the startinglatitude, starting longitude, and population.

In other example, a computer system for generating geographic bordersincludes one or more processors, one or more computer-readable memories,and one or more computer-readable, tangible storage devices. Programinstructions are stored on at least one of the one or more storagedevices for execution by at least one of the one or more processors viaat least one of the one or more memories, to recognize a geographiclocation, determine a starting latitude and a starting longitude for thegeographic location, determine a population for the geographic location,and generate a border for the geographic location based on the startinglatitude, starting longitude, and population.

In another example, a computer program product includes acomputer-readable storage medium has program code embodied therewith.The program code is executable by a computing device to recognize ageographic location, determine a starting latitude and a startinglongitude for the geographic location, determine a population for thegeographic location and generate a border for the geographic locationbased on the starting latitude, starting longitude, and population.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is an illustration of equations for generating geographicborders.

FIG. 2 is a flow diagram illustrating a method for generating geographicborders.

FIG. 3 is a block diagram of a computing device for generatinggeographic borders.

FIG. 4 is a block diagram illustrating mapping out a perimeter.

FIG. 5 is a block diagram illustrating outlining a component.

FIG. 6 is a block diagram illustrating calculating an outer border.

DETAILED DESCRIPTION

Various examples are disclosed herein for generation of geographicborders. In one aspect, a system is disclosed for calculating apseudo-border for a perimeter when the information is unavailable ordoes not exist. By coupling a starting latitude and longitude withpopulation and population density it is possible to approximate theshape of the location. This gives the advantage of not just assuming aborder or a targeting a specific radius as a default, as currently donein the prior art, including but not limited to Google Maps. Google Mapshandles searches in a very specific way. For example, take the search:“Pizza near Me” or “Pizza near Ottawa”. Google Maps applies a ‘in’restriction not ‘near’ and thus will not return results for citiessurrounding Ottawa but will only get results in Ottawa.

For a given geographical region the most available data know aresub-regions, population, population density and latitude, longitude ofall geographical components. The first step is to determine a radiusproportional to population and population density of the region inquestion. Using the fact that the population density was calculatedbased on known area that gives a general understanding of the surfacearea.

Without additional information the shape can only be assumed to besquare or circular with the latitude, longitude as the center. The areaof a circle is known to be: A=πR², as illustrated by this firstequation:

$r = \sqrt{\frac{A}{\pi}}$

Population density is the number of people per Area, as illustrated bythis second equation:

$A = \frac{population}{populationdensity}$

The combination of the first and second equations solves for radius, asillustrated by equation 110 shown in FIG. 1, where C is some constant todefine the distance in Kilometers. Note that this is forcing the shapeof the region into a circle which in general will not map to the actualborder.

A second step is needed to reduce the error and improve the shape. Thenext piece of information available is sub-regions (if the region is notthe lowest in the hierarchy of geographical regions). This step repeatsstep 1 but for all sub-regions providing a perimeter of each sub region(generating several circles that may or may not intersect).

As shown in FIG. 4, Overlay the circles 410 generated from Steps 1 and 2to map out a perimeter with any protruding elements generated from innercircles.

Step 3 is to close the shape (border). It is possible in extreme casesfor the sub regions to be completely outside the parent. One possibleway to generate a completed border is to calculate a line tangent toeach circle that exceeds the parent range and from the parent itself toclose the shape. The above steps generate a completed border 420, asshown in FIG. 4, to approximate a geographical region 120 as shown inFIG. 1.

An additional aspect is how this can relate to natural languagerestrictions such as in, near and outside. Assuming the border is nowcalculated by steps 1 and 2, to outline the next component this border510 is now displayed, as shown in FIG. 5

The following scenarios are used to illustrate the types of restrictionsthe system could handle but is not necessarily limited to.

Scenario for In: Restriction is determined for anything within theperimeter 520 defined as illustrated in FIG. 5. This is a less thanoperation.

Scenario for Around or Near: Restriction is determined for anythingwithin the perimeter defined plus some extra buffer defined. This bufferdoes not necessarily have to be radial about the center. This buffer canbe generated in the same way as our initial location with an additionalmultiplier. The multiplier does not need to be constant it could bederived from the natural language question.

$r_{b} = {B \times C \times \sqrt{\frac{population}{\pi \times {populationdensity}}}}$

Where “rb” is the radial border including an additional buffer and B isthe multiplier to expand the radius.

In the FIG. 6, the outer border 610 shows the additional buffercalculated for a location in an ‘around’ or ‘near’ restriction.

Scenario for Outside: Restriction is determined for anything outside 620the perimeter defined plus some extra buffer defined. This buffer doesnot necessarily have to be radial about the center.

Take for example, the following sample query:

Sample Question: “what are my sales around Ottawa”

What follows is an example of how this system could work on this samplequery:

Step 1: Recognize geographical location

Step 2: Bind Columns to Data

Step 3: Determine border for region

-   -   3.a—Create a radius using equation 4 using the        latitude/longitude as the starting point    -   3.b—Create more precise shape by repeating step 3.a for each        sub-region of the location    -   3.c—Close the shape to generate a completed border

Step 4: Determine the restriction type (around, near, in, within,outside, etc) and generate buffer if required

Step 5: Calculate the corresponding filters based on restriction to theselected columns determined in step 2.

Step 6: Show visualization to the user with the geographical spacialrestriction applied.

Applying the above procedure to the sample query yields the following:

Step 1: Recognize geographical location:

-   -   Ottawa, Canada

Step 2: Bind Columns to Data:

-   -   ‘sales’→‘Sales’, ‘Ottawa’→‘Department Location’

Step 3: Determine border for region

-   -   3.a—Create a radius using equation 4 using the        latitude/longitude as the starting point    -   3.b—Create more precise shape by repeating step 3.a for each        sub-region of the location    -   3.c—Close the shape to generate a completed border

Step 4: Determine the restriction type (around, near, in, within,outside, etc) and generate buffer if required:Restriction ‘Around’detected

Step 5: Calculate the corresponding filters based on restriction to theselected columns determined in step 2

Department Location→Restriction=Around Ottawa

-   -   Nepean, Montreal, Barrhaven, Ottawa, Gatineau

Step 6: Show visualization to the user with the geographical spacialrestriction applied.

As shown in FIG. 2, a computer-implemented method according to oneaspect of the invention includes recognizing a geographic location (step210), determining a starting latitude and starting longitude for thegeographic location (step 220), determining a population for thegeographic location (step 230), and generating a border for thegeographic location using the starting latitude, starting longitude, andpopulation (step 240.)

In one embodiment, the method can further including determining arestriction type to be applied to the geographic location. Therestriction type can be one of the following (but not limited to): anear type, an inside type, an outside type, and around type.

In one embodiment, the method can further include receiving a userrequest for information about a geographic location and displaying avisual representation of the geographic location with the generatedborder.

FIG. 3 is a block diagram of a computing device 80 that may be used toexecute a bandwidth sharing program, according to an illustrativeexample. Computing device 80 may be a server such as a web server orapplication server. Computing device 80 may also be a virtual serverthat may be run from or incorporate any number of computing devices. Acomputing device may operate as all or part of a real or virtual server,and may be or incorporate a workstation, server, mainframe computer,notebook or laptop computer, desktop computer, tablet, smartphone,feature phone, or other programmable data processing apparatus of anykind. Other implementations of a computing device 80 may include acomputer having capabilities or formats other than or beyond thosedescribed herein.

In the illustrative example of FIG. 3, computing device 80 includescommunications fabric 82, which provides communications betweenprocessor unit 84, memory 86, persistent data storage 88, communicationsunit 90, and input/output (I/O) unit 92. Communications fabric 82 mayinclude a dedicated system bus, a general system bus, multiple busesarranged in hierarchical form, any other type of bus, bus network,switch fabric, or other interconnection technology. Communicationsfabric 82 supports transfer of data, commands, and other informationbetween various subsystems of computing device 80.

Processor unit 84 may be a programmable central processing unit (CPU)configured for executing programmed instructions stored in memory 86. Inanother illustrative example, processor unit 84 may be implemented usingone or more heterogeneous processor systems in which a main processor ispresent with secondary processors on a single chip. In yet anotherillustrative example, processor unit 84 may be a symmetricmulti-processor system containing multiple processors of the same type.Processor unit 84 may be a reduced instruction set computing (RISC)microprocessor such as a PowerPC® processor from IBM® Corporation, anx86 compatible processor such as a Pentium® processor from Intel®Corporation, an Athlon® processor from Advanced Micro Devices®Corporation, or any other suitable processor. In various examples,processor unit 84 may include a multi-core processor, such as a dualcore or quad core processor, for example. Processor unit 84 may includemultiple processing chips on one die, and/or multiple dies on onepackage or substrate, for example. Processor unit 84 may also includeone or more levels of integrated cache memory, for example. In variousexamples, processor unit 84 may comprise one or more CPUs distributedacross one or more locations.

Data storage 96 includes memory 86 and persistent data storage 88, whichare in communication with processor unit 84 through communicationsfabric 82. Memory 86 can include a random access semiconductor memory(RAM) for storing application data, i.e., computer program data, forprocessing. While memory 86 is depicted conceptually as a singlemonolithic entity, in various examples, memory 86 may be arranged in ahierarchy of caches and in other memory devices, in a single physicallocation, or distributed across a plurality of physical systems invarious forms. While memory 86 is depicted physically separated fromprocessor unit 84 and other elements of computing device 80, memory 86may refer equivalently to any intermediate or cache memory at anylocation throughout computing device 80, including cache memoryproximate to or integrated with processor unit 84 or individual cores ofprocessor unit 84.

Persistent data storage 88 may include one or more hard disc drives,solid state drives, flash drives, rewritable optical disc drives,magnetic tape drives, or any combination of these or other data storagemedia. Persistent data storage 88 may store computer-executableinstructions or computer-readable program code for an operating system,application files comprising program code, data structures or datafiles, and any other type of data. These computer-executableinstructions may be loaded from persistent data storage 88 into memory86 to be read and executed by processor unit 84 or other processors.Data storage 96 may also include any other hardware elements capable ofstoring information, such as, for example and without limitation, data,program code in functional form, and/or other suitable information,either on a temporary basis and/or a permanent basis.

Persistent data storage 88 and memory 86 are examples of physical,tangible, non-transitory computer-readable data storage devices. Someexamples may use such a non-transitory medium. Data storage 96 mayinclude any of various forms of volatile memory that may require beingperiodically electrically refreshed to maintain data in memory, whilethose skilled in the art will recognize that this also constitutes anexample of a physical, tangible, non-transitory computer-readable datastorage device. Executable instructions may be stored on anon-transitory medium when program code is loaded, stored, relayed,buffered, or cached on a non-transitory physical medium or device,including if only for only a short duration or only in a volatile memoryformat.

Processor unit 84 can also be suitably programmed to read, load, andexecute computer-executable instructions or computer-readable programcode for a semantic model constructor 22, as described in greater detailabove. This program code may be stored on memory 86, persistent datastorage 88, or elsewhere in computing device 80. This program code mayalso take the form of program code 104 stored on computer-readablemedium 102 comprised in computer program product 100, and may betransferred or communicated, through any of a variety of local or remotemeans, from computer program product 100 to computing device 80 to beenabled to be executed by processor unit 84, as further explained below.

The operating system may provide functions such as device interfacemanagement, memory management, and multiple task management. Theoperating system can be a Unix based operating system such as the AIX®operating system from IBM® Corporation, a non-Unix based operatingsystem such as the Windows® family of operating systems from Microsoft®Corporation, a network operating system such as JavaOS® from Oracle®Corporation, or any other suitable operating system. Processor unit 84can be suitably programmed to read, load, and execute instructions ofthe operating system.

Communications unit 90, in this example, provides for communicationswith other computing or communications systems or devices.Communications unit 90 may provide communications through the use ofphysical and/or wireless communications links. Communications unit 90may include a network interface card for interfacing with a LAN 16, anEthernet adapter, a Token Ring adapter, a modem for connecting to atransmission system such as a telephone line, or any other type ofcommunication interface. Communications unit 90 can be used foroperationally connecting many types of peripheral computing devices tocomputing device 80, such as printers, bus adapters, and othercomputers. Communications unit 90 may be implemented as an expansioncard or be built into a motherboard, for example.

The input/output unit 92 can support devices suited for input and outputof data with other devices that may be connected to computing device 80,such as keyboard, a mouse or other pointer, a touchscreen interface, aninterface for a printer or any other peripheral device, a removablemagnetic or optical disc drive (including CD-ROM, DVD-ROM, or Blu-Ray),a universal serial bus (USB) receptacle, or any other type of inputand/or output device. Input/output unit 92 may also include any type ofinterface for video output in any type of video output protocol and anytype of monitor or other video display technology, in various examples.It will be understood that some of these examples may overlap with eachother, or with example components of communications unit 90 or datastorage 96. Input/output unit 92 may also include appropriate devicedrivers for any type of external device, or such device drivers mayreside elsewhere on computing device 80 as appropriate.

Computing device 80 also includes a display adapter 94 in thisillustrative example, which provides one or more connections for one ormore display devices, such as display device 98, which may include anyof a variety of types of display devices. It will be understood thatsome of these examples may overlap with example components ofcommunications unit 90 or input/output unit 92. Input/output unit 92 mayalso include appropriate device drivers for any type of external device,or such device drivers may reside elsewhere on computing device 80 asappropriate. Display adapter 94 may include one or more video cards, oneor more graphics processing units (GPUs), one or more video-capableconnection ports, or any other type of data connector capable ofcommunicating video data, in various examples. Display device 98 may beany kind of video display device, such as a monitor, a television, or aprojector, in various examples.

Input/output unit 92 may include a drive, socket, or outlet forreceiving computer program product 100, which comprises acomputer-readable medium 102 having computer program code 104 storedthereon. For example, computer program product 100 may be a CD-ROM, aDVD-ROM, a Blu-Ray disc, a magnetic disc, a USB stick, a flash drive, oran external hard disc drive, as illustrative examples, or any othersuitable data storage technology.

Computer-readable medium 102 may include any type of optical, magnetic,or other physical medium that physically encodes program code 104 as abinary series of different physical states in each unit of memory that,when read by computing device 80, induces a physical signal that is readby processor 84 that corresponds to the physical states of the basicdata storage elements of storage medium 102, and that inducescorresponding changes in the physical state of processor unit 84. Thatphysical program code signal may be modeled or conceptualized ascomputer-readable instructions at any of various levels of abstraction,such as a high-level programming language, assembly language, or machinelanguage, but ultimately constitutes a series of physical electricaland/or magnetic interactions that physically induce a change in thephysical state of processor unit 84, thereby physically causing orconfiguring processor unit 84 to generate physical outputs thatcorrespond to the computer-executable instructions, in a way that causescomputing device 80 to physically assume new capabilities that it didnot have until its physical state was changed by loading the executableinstructions comprised in program code 104.

In some illustrative examples, program code 104 may be downloaded over anetwork to data storage 96 from another device or computer system foruse within computing device 80. Program code 104 comprisingcomputer-executable instructions may be communicated or transferred tocomputing device 80 from computer-readable medium 102 through ahard-line or wireless communications link to communications unit 90and/or through a connection to input/output unit 92. Computer-readablemedium 102 comprising program code 104 may be located at a separate orremote location from computing device 80, and may be located anywhere,including at any remote geographical location anywhere in the world, andmay relay program code 104 to computing device 80 over any type of oneor more communication links, such as the Internet and/or other packetdata networks. The program code 104 may be transmitted over a wirelessInternet connection, or over a shorter-range direct wireless connectionsuch as wireless LAN, Bluetooth™, Wi-Fi™, or an infrared connection, forexample. Any other wireless or remote communication protocol may also beused in other implementations.

The communications link and/or the connection may include wired and/orwireless connections in various illustrative examples, and program code104 may be transmitted from a source computer-readable medium 102 overnon-tangible media, such as communications links or wirelesstransmissions containing the program code 104. Program code 104 may bemore or less temporarily or durably stored on any number of intermediatetangible, physical computer-readable devices and media, such as anynumber of physical buffers, caches, main memory, or data storagecomponents of servers, gateways, network nodes, mobility managemententities, or other network assets, en route from its original sourcemedium to computing device 80.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention. The computer readable storage medium can be atangible device that can retain and store instructions for use by aninstruction execution device. The computer readable storage medium maybe, for example, but is not limited to, an electronic storage device, amagnetic storage device, an optical storage device, an electromagneticstorage device, a semiconductor storage device, or any suitablecombination of the foregoing.

A non-exhaustive list of more specific examples of the computer readablestorage medium includes the following: a portable computer diskette, ahard disk, a random access memory (RAM), a read-only memory (ROM), anerasable programmable read-only memory (EPROM or Flash memory), a staticrandom access memory (SRAM), a portable compact disc read-only memory(CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk,a mechanically encoded device such as punch-cards or raised structuresin a groove having instructions recorded thereon, and any suitablecombination of the foregoing.

A computer readable storage medium, as used herein, is not to beconstrued as being transitory signals per se, such as radio waves orother freely propagating electromagnetic waves, electromagnetic wavespropagating through a waveguide or other transmission media (e.g., lightpulses passing through a fiber-optic cable), or electrical signalstransmitted through a wire. Computer readable program instructionsdescribed herein can be downloaded to respective computing/processingdevices from a computer readable storage medium or to an externalcomputer or external storage device via a network, for example, theInternet, a local area network, a wide area network and/or a wirelessnetwork. The network may comprise copper transmission cables, opticaltransmission fibers, wireless transmission, routers, firewalls,switches, gateway computers and/or edge servers. A network adapter cardor network interface in each computing/processing device receivescomputer readable program instructions from the network and forwards thecomputer readable program instructions for storage in a computerreadable storage medium within the respective computing/processingdevice.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).

In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention. Aspects of thepresent invention are described herein with reference to flowchartillustrations and/or block diagrams of methods, apparatus (systems), andcomputer program products according to embodiments of IBM CONFIDENTIALD-2 the invention.

It will be understood that each block of the flowchart illustrationsand/or block diagrams, and combinations of blocks in the flowchartillustrations and/or block diagrams, can be implemented by computerreadable program instructions. These computer readable programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing thefunctions/acts specified in the flowchart and/or block diagram block orblocks. These computer readable program instructions may also be storedin a computer readable storage medium that can direct a computer, aprogrammable data processing apparatus, and/or other devices to functionin a particular manner, such that the computer readable storage mediumhaving instructions stored therein comprises an article of manufactureincluding instructions which implement aspects of the function/actspecified in the flowchart and/or block diagram block or blocks. Thecomputer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

What is claimed is:
 1. A computer-implemented method for generatinggeographic borders, the method comprising: receiving a user request forinformation about a first geographic location, wherein the user requestincludes a location, and wherein the request includes a restrictiontype; recognizing, from the location of the received user request, thefirst geographic location; determining a starting latitude and astarting longitude for the first geographic location; determining afirst population for the first geographic location, wherein the firstpopulation includes a first population value and a first populationdensity value of the first geographic location; determining therestriction type includes a near type; determining, based on thedetermined restriction type is a near type and based on the firstpopulation value and based on the first population density value, aradius of the first geographic location; identifying, based on thedetermined radius of the first geographic location, a second geographiclocation, wherein the second geographic location is separate anddistinct from the first geographic location, and wherein the secondgeographic location includes a second latitude and a second longitude;determining, a second population for the second geographic location,wherein the second population includes a second population value and asecond population density value of the second geographic location; andgenerating a border for the first geographic location based on thestarting latitude, starting longitude, first population, secondlatitude, second longitude, and second population.
 2. The method ofclaim 1, further comprising: displaying a visual representation of thefirst geographic location with the generated border.
 3. The method ofclaim 1, wherein: generating a border includes calculating one or moresub-regions.
 4. A computer program product for processing naturallanguage queries for geographic data sets, the computer program productcomprising a computer-readable storage medium having program codeembodied therewith, the program code executable by a computing deviceto: receive a first natural language query, the first natural languagequery directed towards a first geographic location; parse the receivedfirst natural language query with a natural language processing engine;detect, based on the parsing, the first geographic location in the firstnatural language query; retrieve, based on the detected first geographiclocation, a population value and a population density value; determine,based on the retrieved population value and based on the retrievedpopulation density value, a radius around the first geographic location;draw, based on the determined radius, a border of the first geographiclocation; detect, based on the parsing, a geographic restriction of thefirst geographic location in the first natural language query, whereinthe geographic restriction is outside the first geographic location;retrieve, based on the detected geographic restriction and based on thedrawn border, a second population value and a second population densityvalue, wherein the retrieved second population value and the retrievedsecond population density value are of a second geographic locationwithin the drawn border; determine, based on the retrieved secondpopulation value and based on the retrieved population density value, asecond radius around the second geographic location; redraw, based onthe determined second radius, the border of first geographic location,wherein the redrawn border includes both the first geographic locationand the second geographic location; detect, based on the parsing, atopic value in the first natural language query; and generate, based onthe detected topic value and based on the redrawn border, a response tothe first natural language query.
 5. The computer program product ofclaim 4, wherein the first geographic location is a first city andwherein the second geographic location is a second city, and wherein thefirst city is separated from the second city.
 6. The computer programproduct of claim 5, wherein the first geographic location is a firstlatitude and longitude and wherein the second geographic location is asecond latitude and longitude.
 7. A system for processing naturallanguage queries for geographic data sets, the system comprising: amemory, the memory including computer-readable program instructions; anda processor, the processor communicatively coupled to the memory, theprocessor in response to reading the program instructions configured to:receive a first natural language query, the first natural language querydirected towards a first city; parse the received first natural languagequery with a natural language processing engine; detect, based on theparsing, the first city in the first natural language query; retrieve,based on the detected first city, a population value and a populationdensity value; determine, based on the retrieved population value andbased on the retrieved population density value, a radius around thefirst city; draw, based on the determined radius, a border of the firstcity; detect, based on the parsing, a geographic restriction of thefirst city in the first natural language query; retrieve, based on thedetected geographic restriction and based on the drawn border, a secondpopulation value and a second population density value, wherein theretrieved second population value and the retrieved second populationdensity value are of a second city adjacent to the drawn border, andwherein the second city is distinct and separate from the first city;determine, based on the retrieved second population value and based onthe retrieved population density value, a second radius around thesecond city; redraw, based on the determined second radius, the borderof first city, wherein the redrawn border includes both the first cityand the second city; detect, based on the parsing, a topic value in thefirst natural language query; and generate, based on the detected topicvalue and based on the redrawn border, a response to the first naturallanguage query.
 8. The computer program product of claim 7, wherein thegeographic restriction is outside of the first city.
 9. The computerprogram product of claim 7, wherein the geographic restriction is nearthe first city.